"""
    cookie是用于标识用户的身份信息的一段数据
        cookie由服务器返回（seession_id)
"""

import requests

url = "https://www.baidu.com"

# 设置请求头参数
headers = {
    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36 Edg/130.0.0.0',
    'Cookie': 'BAIDUID_BFESS=FBD86CD1E111A5292FAA4776BB6376A1:FG=1; __bid_n=192aa646c229888c769d67; BDUSS=nJqdFBGenlDY01DV0tDY0hOdUJjMXNNdG5vREJad05QeHJyZmlpNU5sflpVa1JuSUFBQUFBJCQAAAAAAAAAAAEAAAAgWWU10tHKxbXEx-C0ujIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANnFHGfZxRxnT; BDUSS_BFESS=nJqdFBGenlDY01DV0tDY0hOdUJjMXNNdG5vREJad05QeHJyZmlpNU5sflpVa1JuSUFBQUFBJCQAAAAAAAAAAAEAAAAgWWU10tHKxbXEx-C0ujIwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANnFHGfZxRxnT; newlogin=1; BIDUPSID=FBD86CD1E111A5292FAA4776BB6376A1; PSTM=1733191250; H_PS_PSSID=61027_61096_61176_61223_61206_61211_61208_61215_61244_61279_61300; BD_UPN=12314753; BA_HECTOR=800080050k8k20a42g252gagbpssp31jkspij1u; ZFY=blLmk0GHMgK6dcXIcpNezAs9lvJzhN8MGks:Alowys7I:C'
}

response = requests.get(url, headers=headers)

print(response.content.decode())
print(response.request.headers)
